//import { getUserInfoSevice } from "@/api/user";
import { defineStore } from "pinia";
import { ref } from "vue";
export const useUserStore=defineStore('user',()=>{

  //用户信息模块
  const user=ref({})
  const getUser=()=>{
    return user.value
  }

  const setUser=value=>{
    user.value=value
  }

  const token=ref(null)
  const setToken=value=>{
    token.value=value
  }
  const getToken=()=>{
    return token.value
  }
  

  

  
  return{
    user,
    getUser,
    setUser ,
    setToken,
    getToken,
    token 
  }

},{
  persist: true,
})